package com.live.dengdengtv.net.callback;

import com.live.dengdengtv.bean.SimpleInfoData;

import okhttp3.Call;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by wyf on 2016/8/15.
 */
public interface RequestNetCallback {

    /**
     * UI Thread
     *
     * @param request
     */
    void onBefore(Request request, int id);

    /**
     * UI Thread
     *
     * @param
     */
    void onAfter(int id);

    /**
     * UI Thread
     *
     * @param progress
     */
    void inProgress(float progress, long total , int id);



    void onError(Call call, Exception e, int id);

    /**
     *
     * @param response
     * @param id
     * @return  true 不在执行ProgressDialogCallBack.onResponse方法
     */
    boolean onResponse(SimpleInfoData response, int id);
}
